home *** CD-ROM | disk | FTP | other *** search
/ Alles Voor Internet / Tout Pour Internet / alles voor internet.iso / MacInternet™ / Unix / maclayersunixend1.30.shar / 1.30 / layers.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-16  |  2.2 KB  |  70 lines

  1. /*             Copyright (C) 1989 by David W. Trissel 
  2.  *
  3.  *  Not derived from licensed software.
  4.  *
  5.  * Permission is granted to freely use, copy, modify, and redistribute
  6.  * this software, provided that no attempt is made to gain profit from it,
  7.  * the author is not construed to be liable for any results of using the
  8.  * software, alterations are clearly marked as such, and this notice is
  9.  * not modified.
  10.  *
  11.  */
  12.  
  13. #define HOSTPROTOCOL    2                    /* current host protocol */
  14.  
  15. #define MAXPCHAN    7                        /* maximum layers supported */
  16.  
  17. #define MAXSTR        200
  18. #define    MAXARGS        64
  19. #define MAXLINE        1024
  20. #define IOSIZE        800                        /* data gulp handling size */
  21.  
  22. /* WARNING - packet sizes must be insured to never match the ESCAPE char */
  23. #define    ESCAPE        '}'                        /* datalink escape character */
  24.  
  25. #define DO         if (Dflag)                    /* for debugging */
  26.  
  27. /* miscelaneous common data */
  28. extern    int    Dflag;                            /* debug dump indicator flag */
  29. extern    int    Clientversion;                    /* client version number */
  30. extern    int    Protocollevel;                    /* effective protocol level */
  31. extern    int    Clientlevel;                    /* client's protocol level */
  32.  
  33. /* Shape structure passed between MacLayers and ourselves */
  34. struct Shape
  35. {    short    worigv;                            /* verical window bit origin */
  36.     short    worigh;                            /* horizontal window bit origin */
  37.     short    wlines;                            /* window height */
  38.     short    wchars;                            /* window width */
  39.     short    wfont;                            /* window font size */
  40.     short    wattr;                            /* window attributes */
  41. };
  42.  
  43. #define Wa_shell    0x01                    /* window is a shell */
  44.  
  45.  
  46.   /* The following modules define the complete protocol/server interface */
  47.  
  48.                 /* layers.c */
  49.  
  50. extern void FQuit(/* exitcode */);
  51. extern void ReceiveQuit();
  52. extern void ReceiveNew(/* chanid, shape */);
  53. extern void ReceiveDelete(/* chanid */);
  54. extern void ReceiveSignal(/* chanid, signal */);
  55. extern void    ReceiveData(/* chanid, buff, cnt */);
  56. extern void ReceiveReshape(/*chanid, shape */);
  57. extern void DEBUG(/* format, arg1, arg2, arg3, arg4 */);
  58.  
  59.                 /* protocol.c */
  60.  
  61. extern int    InitLink();
  62. extern int    TopChannel();
  63. extern int    SendNew(/* shape */);
  64. extern void    SendTitle(/* chan, buff, cnt */);
  65. extern void SendDelete(/* chan */);
  66. extern void SendQuit();
  67. extern void    SendReshape(/* chan, shape */);
  68. extern void    SendData(/* chan, buff, cnt */);
  69. extern void    ProcessStreamin();
  70.